package com.example.day01.ptoto_wall;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.GridView;

import com.example.day01.R;

public class PhotoWallActivity extends AppCompatActivity {
    GridView photoGv;
    private PhotoAdapter adapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_photo_wall);
//        查找控件
        photoGv = findViewById(R.id.photo_wall_gv);
//        数据源
        String[]mDatas = ImageUrls.imageurls;
//        创建适配器
        adapter = new PhotoAdapter(this, mDatas);
//        设置适配器
        photoGv.setAdapter(adapter);
    }
}
